package com.freesky.biz.rights.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.freesky.biz.rights.domain.RightsPayEntity;
import com.freesky.biz.rights.domain.RightsReceiveEntity;
import com.freesky.biz.rights.service.IRightsPayService;
import com.freesky.biz.rights.service.IRightsReceiveService;
import com.freesky.common.annotation.Log;
import com.freesky.common.core.controller.BaseController;
import com.freesky.common.core.domain.AjaxResult;
import com.freesky.common.core.page.TableDataInfo;
import com.freesky.common.enums.BusinessType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/rights/pay")
public class RightsPayController extends BaseController {

    @Autowired
    private IRightsPayService rightsPayService;

    /**
     * 权益支付记录列表(分页)
     */
    @PreAuthorize("@ss.hasPermi('rights:pay:list')")
    @GetMapping("/page")
    public TableDataInfo page(RightsPayEntity rightsPay) {
        IPage<RightsPayEntity> pageList = rightsPayService.selectPayPage(plusPage(),rightsPay);
        return getDataTable(pageList);
    }

}
